#include"campus_login_administer.h"
#include"../log/campus_logger.h"

std::unordered_map<std::string, websocketpp::connection_hdl>* CampusLoginAdminister::online_map_ = nullptr; 
void CampusLoginAdminister::setOnlineMap(std::unordered_map<std::string, websocketpp::connection_hdl>* online_map)
{
    online_map_ = online_map;
}

std::unordered_map<std::string, websocketpp::connection_hdl> CampusLoginAdminister::GetOnlineMap()
{
    if(online_map_ == nullptr)
    {
        CampusLogger::warn("CampusLoginAdminister::GetOnlineMap: online_map_ is nullptr");
        return std::unordered_map<std::string, websocketpp::connection_hdl>();
    }

    return *online_map_;
}

CampusLoginAdminister::CampusLoginAdminister()
{
}

CampusLoginAdminister::~CampusLoginAdminister()
{
}
